local function main(userOb,msgData)
    if not msgData.id then
        return
    end

    local trump = userOb:add_trump(msgData.id)
    if not trump then
        local result = {}
        result.code = 401
        userOb:send_packet("MSGS2CObtainTrump", result)
        return
    end

    local result = {}
    result.code = 200
    result.data = userOb:query_trump()
    userOb:send_packet("MSGS2CObtainTrump", result)
end

--注册方法
COMMAND_D:register_command("MSGC2SObtainTrump",GameCmdType.NONE, main)
